Favicon

You are here: Home > API Reference > Platform > User Authentication > Generate two factor secret

Generate two factor secret

Generate two factor secret

GET
https://api.applivery.io/v1/auth/two-factor
curl -X GET "https://api.applivery.io/v1/auth/two-factor" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
const response = await fetch("https://api.applivery.io/v1/auth/two-factor", {
  method: "GET",
  headers: {
    Authorization: "Bearer <YOUR_API_KEY>",
  },
});

const data = await response.json();
import requests

response = requests.get(
    "https://api.applivery.io/v1/auth/two-factor",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
)

data = response.json()

Request

Send your API key in the request header authorization
Example: Authorization: Bearer <token>

Responses

200 Response application/json
status boolean optional
data object optional
secret string optional
≤ 500 characters
qr string optional
≤ 500 characters
uri string optional
≤ 500 characters
{
    "status": true,
    "data": {
        "secret": "string",
        "qr": "string",
        "uri": "string"
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}